home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d20
/
loge_006.arc
/
LOGENTRY.DOC
< prev
next >
Wrap
Text File
|
1990-12-19
|
2KB
|
43 lines
12-17-90
LogEntry is a simple little program to write entries to a log file in the
BinkleyTerm log file format. It was written to allow log entries to be made
from batch files.
All parameters and the info to be written to the log are passed to LogEntry
on the command line. The first parameter is the name of the file that you
want the log entry to be written to. The second parameter is the character
that will appear in the first byte of the actual log entry. The third
parameter will appear after the date and time in the log entry. I use caps
in BinkleyTerm style and usually list the name of the batch file generating
the message. The rest of the parameters are put in the log file as they
appear. Whatever is written to the log file is also echoed to the screen so
you don't need to duplicate entries.
Example of use of LogEntry in Sample.Bat:
@echo off
LOGENTRY %syslog% - SAMPLE.BAT Sample batch file Started
.
.
.
.
LOGENTRY %syslog% # SAMPLE.BAT Sample batch file Ended
The entries in the file named in %syslog% would be:
- 17 Dec 09:45:37 SAMPLE.BAT Sample batch file Started
# 17 Dec 09:47:18 SAMPLE.BAT Sample batch file Ended
I use an environment variable to specify the log file name to make it easier
to change. You can hard-code it if you want. An example of setting %syslog%
is "SET syslog=d:\binkley\binkley.log". You have to tell LogEntry where the
file to be written to or it will just write to the current directory.
Your on your own from here... If you have any comments or suggestions, drop
me a note. Maybe we can do something with them...
Mike Brandt FidoNet 1:269/201
RD#6 Box 779 BBS: 1-201-948-3428
Branchville, NJ 07826